package com.missilike.biz;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.missilike.core.domain.AccountInfoRequest;
import com.missilike.core.domain.AccountRegisteredReuqest;
import com.missilike.core.result.CommonResult;
import com.missilike.domain.request.MilAccountStatusForm;
import com.missilike.domain.response.AccountsFriendInfo;
import com.missilike.domain.response.MilAccountInfo;
import com.missilike.repository.entity.MilAccount;
import com.missilike.repository.entity.extend.MilAccountExtend;

import java.math.BigDecimal;
import java.util.List;
import java.util.Set;

/**
 * <p>
 * 服务类
 * </p>
 *
 * @author kin
 * @since 2018-12-13
 */
public interface IMilAccountService extends IService<MilAccount> {

    /**
     * 用户登陆
     *
     * @param account     账号
     * @param password    密码
     * @param smsCode     验证码啊
     * @param phoneNumber 手机号
     * @return
     */
    MilAccount login(Long account, String password, String smsCode, String phoneNumber);

    MilAccount userRegistered(AccountRegisteredReuqest request);

    MilAccount accountPsdResetService(String phoneNumber, String smsCode, String newPassword);

    Page<MilAccountInfo> getList(Page<MilAccount> page,String account);

    MilAccountInfo getAccount(String accountId);

    void status(MilAccountStatusForm milAccountStatusForm);

    MilAccount updateAccountInfo(AccountInfoRequest milAccount);

    List<MilAccountInfo> getTopUser();

    List<MilAccountExtend> getUserByCondition(String id, String userAccount, String nickName, String mobile);

    List<MilAccountExtend> getUserByCondition(String id, String keyWord);

    List<MilAccountInfo> getUserByIds(Set<String> ids);

    /**
     * 增加经验值，计算等级和下一等级所需经验值
     * */
    CommonResult updataExperience(String accountId, Integer experience);

    /**
     * 重置禁用账号
     */
    void resetDisableUser();

    void setEquipmentService(IMilEquipmentService iMilEquipmentService);

    void changeBalance(String accountId, BigDecimal amount);

    AccountsFriendInfo getAccountsFriendInfo(String accountId);
}
